﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompanyManageSystem.Model
{
    [Table("PurchaseStorageOrderDetail")]
    public class PurchaseStorageOrderDetail:BaseEntity
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public Guid MaterialID { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Number { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 金额(元)
        /// </summary>
        public decimal Money { get { return Number * Price; } set { decimal money = Number * Price; money = value; } }
        /// <summary>
        /// 饭堂
        /// </summary>
        public string Canteen { get; set; }
        /// <summary>
        /// 档口
        /// </summary>
        public string Stall { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 主单ID
        /// </summary>
        public Guid PurchaseStorageOrderID { get; set; }

        [NotMapped]
        public bool IsChecked { get; set; }
    }
}
